package cn.tedu.tmall.admin.mall.dao.repository.impl;

import cn.tedu.tmall.admin.mall.dao.mapper.GoodsDetailMapper;
import cn.tedu.tmall.admin.mall.dao.repository.IGoodsDetailRepository;
import cn.tedu.tmall.admin.mall.pojo.po.GoodsDetailPO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Slf4j
@Repository
public class GoodsDetailRepository implements IGoodsDetailRepository {
    @Autowired
    private GoodsDetailMapper goodsDetailMapper;
    @Override
    public Integer save(GoodsDetailPO goodsDetailPO) {
        return goodsDetailMapper.insert(goodsDetailPO);
    }

    @Override
    public GoodsDetailPO selectByGoodId(QueryWrapper queryWrapper) {
        return goodsDetailMapper.selectOne(queryWrapper);
    }
}
